<div class="panel panel-default panel-intro">

    <div class="panel-heading">
        {:__('Info')}
    </div>
    {if condition="$detail neq null "}

    <div class="panel-body newrow prindBody">
        <div class="row">
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Code')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['code']}
                </div>
            </div>
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Customer_name')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['customer_name']}
                </div>
            </div>
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Linkman')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['linkman']}
                </div>
            </div>
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Phone')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['phone']}
                </div>
            </div>

            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Sell_code')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['sell_code']}
                </div>
            </div>

            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Status_list')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {switch name="$detail[0]['status_list']" }
                    {case value="-1" }{:__('Status_list -1')}{/case}
                    {case value="1" }{:__('Status_list 1')}{/case}
                    {case value="2"}{:__('Status_list 2')}{/case}
                    {case value="3"}{:__('Status_list 3')}{/case}
                    {case value="4"}{:__('Status_list 4')}{/case}
                    {case value="5"}{:__('Status_list 5')}{/case}
                    {case value="6"}{:__('Status_list 6')}{/case}
                    {default /}
                    {:__('Status 0')}
                    {/switch}

                </div>
            </div>
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Billing_time')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['billing_time']|date="Y-m-d",###}
                </div>
            </div>
            <div class="col-md-12 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-1">{:__('Address')}:</label>
                <div class="col-xs-12 col-sm-10">
                    {$detail[0]['city']}{$detail[0]['address']}

                </div>
            </div>
            <div class="col-md-4 col-xs-12 form-group">
                <label class="control-label col-xs-12 col-sm-3">{:__('Remark')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['remark']}
                </div>
            </div>
            {if condition="$detail[0]['status_list'] eq -1"}
            <div class="col-md-4 col-xs-12 form-group" style="color: red">
                <label class="control-label col-xs-12 col-sm-3">{:__('Reason')}:</label>
                <div class="col-xs-12 col-sm-6">
                    {$detail[0]['reason']}
                </div>
            </div>
            {/if}
            {if condition="$detail[0]['status_list'] eq 2"}
            <div class="col-md-12 col-xs-12 form-group print-remark">
                <label class="control-label col-xs-12 col-sm-1" style="color: red">{:__('Cause for failure')}:</label>
                <div class="col-xs-12 col-sm-11">
                    {$detail[0]['cause']}
                </div>
            </div>
            {/if}
            {if condition="$detail[0]['status_list'] eq 4"}
            <div class="col-md-12 col-xs-12 form-group print-remark">
                <label class="control-label col-xs-12 col-sm-1" style="color: red">{:__('Cause for failure')}:</label>
                <div class="col-xs-12 col-sm-11">
                    {$detail[0]['cause']}
                </div>
            </div>
            {/if}
        </div>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>{:__('Serial number')}</th>
                    <th>{:__('Sku')}</th>
                    <th>{:__('Commodity')}</th>     
                    <th>{:__('Specification')}</th>
                    <th>{:__('Attributes')}</th>
                    <th>{:__('Unit')}</th>

                    <th>{:__('Delivery quantity')}</th>
                    <th>{:__('unit price')}</th>
                    <th>{:__('Subtotal')}</th>
                    <th>{:__('Remarks')}</th>
                </tr>
                {if condition="$product neq null"}
                {volist name="product" id="vo" key="k"}
                <tr>
                    <td>{$k}</td>
                    <td>{$vo.products['sku']}</td>
                    <td>{$vo.products['name']}</td>
                    <td>{$vo.products['specification']}</td>
                    <td>
                        {volist name="$vo.products['prop']" id="val"}
                        {$val.title}:{:isset($val['value'])?$val['value']:""}
                        {/volist}
                    </td>
                    <td>{$vo.products.unit}</td>

                    <td>{$vo.nums}</td>
                    <td>{$vo.price}</td>
                    <td>{$vo.subtotal}</td>
                    <td>{$vo.remark}</td>
                </tr>
                {/volist}
                {/if}

            </table>
        </div>
        <div style="padding-top: 20px;">
            <div class="row">
                <div  class="control-label col-xs-12 col-sm-12">


                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div  class="col-md-12 col-xs-12 form-group" style="text-align: right;">	
            {if condition="$detail[0]['status_list'] eq 3"}
            <!-- <a class="btn btn-default" href="{:url('sell/sellreturn/edit',array('ids'=>$detail[0]['id']))}" role="button">修改</a> -->
            <a class="btn btn-default {:$auth->check('sell/rfinancial/approval')?'':'hide'}" onclick="approval('yes', {$detail[0]['id']})"   role="button">通过审核</a>
            <a class="btn btn-default {:$auth->check('sell/rfinancial/approval')?'':'hide'}" href="javascript:void(0);" onclick="appWhy({$detail[0]['id']})" role="button">驳回审核</a>
            {/if}

            {if condition="$detail[0]['status_list'] eq 1"}
            <!-- <a class="btn btn-default {:$auth->check('purchase/sto_audit/approval')?'':'hide'}" onclick="storage({$detail[0]['id']})"  role="button">确认入库</a> -->
            {/if}
            {if condition="$detail[0]['status_list'] lt 5"}
            {if condition="$detail[0]['status_list'] gt 0"}
            <!--<a class="btn btn-default" href="javascript:void(0)" onclick="abandon({$detail[0]['id']})" role="button">作废</a>-->
            {/if}
            {/if}
            <!--<a class="btn btn-default" id="prind" href="javascript:void(0)" role="button">打印</a>-->
        </div>
    </div>
</div>
</div>

{/if}
